#ifndef COMMONMACRO_H
#define COMMONMACRO_H
#define  safeDelete(ptr) {if(ptr) {delete ptr ; ptr = nullptr;}}
#define  safeDeleteSharePtr(ptr) {if(ptr){if(ptr.unique()) ptr.reset();}}
#define  safeDeleteTowMap(maps){ for(auto map:maps){ for(auto param:map){ safeDelete(param);}}}
#define  safeDeleteThreeMap(maps){ for(auto map:maps){ for(auto lists:map){ for(auto param:lists){ safeDelete(param);}}}}
#define  safeDeleteMapOrList(maps){for(auto param:maps){ safeDelete(param);}}
#endif // COMMONMACRO_H
